from bs4 import BeautifulSoup

file_path = 'practice.html'

with open(file_path, 'r', encoding='utf-8') as file:
    html_content = file.read()

soup = BeautifulSoup(html_content, 'lxml')

titles = soup.find_all(['h1', 'h2', 'h3'])
for title in titles:
    print(title.get_text(strip=True))

product_names = soup.find_all('span', class_='product-name')
product_prices = soup.find_all('span', class_='product-price')

for name, price in zip(product_names, product_prices):
    print(f"Product Name: {name.get_text(strip=True)}")
    print(f"Product Price: {price.get_text(strip=True)}")
    print('-' * 40)